.class public Lcom/facebook/orca/photos/tiles/UserTileView;
.super Landroid/widget/FrameLayout;
.source "UserTileView.java"


# instance fields
.field private a:Lcom/facebook/orca/photos/tiles/UserTileViewLogic;
    .annotation runtime Lcom/google/inject/Inject;
    .end annotation
.end field

.field private b:Lcom/facebook/orca/photos/tiles/DefaultTiles;
    .annotation runtime Lcom/google/inject/Inject;
    .end annotation
.end field

.field private c:Lcom/facebook/orca/images/UrlImage;

.field private d:Ljava/lang/String;

.field private e:Lcom/facebook/orca/users/User;

.field private f:I


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter

    .prologue
    .line 48
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 49
    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/facebook/orca/photos/tiles/UserTileView;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 50
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 43
    invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 44
    invoke-direct {p0, p1, p2}, Lcom/facebook/orca/photos/tiles/UserTileView;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 45
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 38
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 39
    invoke-direct {p0, p1, p2}, Lcom/facebook/orca/photos/tiles/UserTileView;->a(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 40
    return-void
.end method

.method private a()V
    .locals 4

    .prologue
    .line 97
    iget-object v0, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->e:Lcom/facebook/orca/users/User;

    if-eqz v0, :cond_0

    .line 98
    iget-object v0, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->a:Lcom/facebook/orca/photos/tiles/UserTileViewLogic;

    iget-object v1, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->c:Lcom/facebook/orca/images/UrlImage;

    iget-object v2, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->e:Lcom/facebook/orca/users/User;

    iget v3, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->f:I

    invoke-virtual {v0, v1, v2, v3}, Lcom/facebook/orca/photos/tiles/UserTileViewLogic;->a(Lcom/facebook/orca/images/UrlImage;Lcom/facebook/orca/users/User;I)V

    .line 102
    :goto_0
    return-void

    .line 100
    :cond_0
    iget-object v0, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->a:Lcom/facebook/orca/photos/tiles/UserTileViewLogic;

    iget-object v1, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->c:Lcom/facebook/orca/images/UrlImage;

    iget-object v2, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->d:Ljava/lang/String;

    iget v3, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->f:I

    invoke-virtual {v0, v1, v2, v3}, Lcom/facebook/orca/photos/tiles/UserTileViewLogic;->a(Lcom/facebook/orca/images/UrlImage;Ljava/lang/String;I)V

    goto :goto_0
.end method

.method private a(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 4
    .parameter
    .end parameter
    .parameter
        .annotation runtime Ljavax/annotation/Nullable;
        .end annotation
    .end parameter

    .prologue
    const/16 v3, 0x32

    const/4 v2, -0x1

    .line 53
    invoke-virtual {p0}, Lcom/facebook/orca/photos/tiles/UserTileView;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0, p0}, Lcom/facebook/orca/app/GuiceUtil;->a(Landroid/content/Context;Ljava/lang/Object;)V

    .line 55
    sget-object v0, Lcom/facebook/orca/R$styleable;->h:[I

    invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;

    move-result-object v0

    .line 56
    const/4 v1, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I

    move-result v0

    iput v0, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->f:I

    .line 57
    iget v0, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->f:I

    if-ne v0, v2, :cond_0

    .line 58
    invoke-static {p1, v3}, Lcom/facebook/orca/common/util/SizeUtil;->a(Landroid/content/Context;I)I

    move-result v0

    iput v0, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->f:I

    .line 61
    :cond_0
    new-instance v0, Lcom/facebook/orca/images/UrlImage;

    invoke-virtual {p0}, Lcom/facebook/orca/photos/tiles/UserTileView;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/facebook/orca/images/UrlImage;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->c:Lcom/facebook/orca/images/UrlImage;

    .line 62
    iget-object v0, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->c:Lcom/facebook/orca/images/UrlImage;

    iget-object v1, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->b:Lcom/facebook/orca/photos/tiles/DefaultTiles;

    const-string v2, ""

    invoke-virtual {v1, v2, v3}, Lcom/facebook/orca/photos/tiles/DefaultTiles;->b(Ljava/lang/String;I)Landroid/graphics/drawable/BitmapDrawable;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/facebook/orca/images/UrlImage;->setPlaceHolderDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 63
    iget-object v0, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->c:Lcom/facebook/orca/images/UrlImage;

    invoke-virtual {p0, v0}, Lcom/facebook/orca/photos/tiles/UserTileView;->addView(Landroid/view/View;)V

    .line 64
    return-void
.end method


# virtual methods
.method public setTileSizePx(I)V
    .locals 0
    .parameter

    .prologue
    .line 92
    iput p1, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->f:I

    .line 93
    invoke-direct {p0}, Lcom/facebook/orca/photos/tiles/UserTileView;->a()V

    .line 94
    return-void
.end method

.method public setUser(Lcom/facebook/orca/users/User;)V
    .locals 1
    .parameter
        .annotation runtime Ljavax/annotation/Nullable;
        .end annotation
    .end parameter

    .prologue
    .line 81
    iput-object p1, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->e:Lcom/facebook/orca/users/User;

    .line 82
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->d:Ljava/lang/String;

    .line 83
    invoke-direct {p0}, Lcom/facebook/orca/photos/tiles/UserTileView;->a()V

    .line 84
    return-void
.end method

.method public setUserId(Ljava/lang/String;)V
    .locals 1
    .parameter

    .prologue
    .line 71
    iput-object p1, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->d:Ljava/lang/String;

    .line 72
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/facebook/orca/photos/tiles/UserTileView;->e:Lcom/facebook/orca/users/User;

    .line 73
    invoke-direct {p0}, Lcom/facebook/orca/photos/tiles/UserTileView;->a()V

    .line 74
    return-void
.end method
